package com.ledi.pay.utill;

/**
 * 返回给前台的成功提示
 *
 * @author fengshuonan
 * @date 2016年11月12日 下午5:05:22
 */
public class SuccessTip extends Tip {

	public static final Integer	SUCCESS		= 200;

	private static String		successStr	= "成功";

	private Object				data;

	public SuccessTip() {

		buildSuccess();
	}

	public SuccessTip(int code, String message) {

		super();
		this.code = code;
		this.message = message;
	}

	public SuccessTip(int code, String message, Object data) {

		super();
		this.code = code;
		this.message = message;
		this.data = data;
	}

	public static SuccessTip buildSuccess(Object data) {

		SuccessTip successTip = new SuccessTip();
		successTip.setCode(SUCCESS);
		successTip.setMessage(successStr);
		successTip.setData(data);
		return successTip;
	}

	public static Tip buildSuccess() {

		Tip successTip = new Tip();
		successTip.setCode(SUCCESS);
		successTip.setMessage(successStr);
		return successTip;
	}

	public Object getData() {

		return data;
	}

	public void setData(Object data) {

		this.data = data;
	}

}
